<template>
  <h1>{{ count }}</h1>
</template>

<script>
export default {
  name: "Hello",
  data() {
    return {
      count: 0,
    };
  },
  mounted() {
    //  初始化就绑定事件
    this.$bus.$on("count", (count) => {
      this.count = count;
    });
  },
};
</script>

<style>
</style>